<h1>Login as...?</h1>

<% form_for(:user, :url => dologin_user_path(params[:id]), :html => { :method => :post }) do |f| %>
  <p>
    <b>Login</b><br />
    <%= f.select :id, User.find(:all).collect {|x| [x.login, x.id]} %>
  </p>

  <p>
    <input type="hidden" name="return_to" value="<%=h params[:return_to] %>">
    <%= f.submit "Login" %>
  </p>
<% end %>

<%= link_to 'Back', users_path %>
